-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Fix name() functions for local defs in rustc_public
#149401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The `name()` function specifies that it returns absolute path of items, however it wasn't including the crate name for local items. This change fixes that. This was reported here: rust-lang/project-stable-mir#109
This comment has been minimized.
This comment has been minimized.
|
It looks like I need to do some debugging. It's not clear to me why this change affected these tests. I.e., why:
It seems to only affect EDIT: |
|
You removed |
Thanks @oli-obk. So how should I use |
7792b9a to
ec1f5e3
Compare
|
Beautiful. @oli-obk it worked like a charm. I changed the pretty printer to use trimmed_name to make it less verbose. Thanks! |
|
Seems like this PR also fixes rust-lang/project-stable-mir#41? |
Good question. I haven't tried it yet |
| // WARNING: This is highly experimental output it's intended for rustc_public developers only. | ||
| // If you find a bug or want to improve the output open a issue at https://github.com/rust-lang/project-stable-mir. | ||
| fn operands(_1: u8) -> () { | ||
| fn operands::operands(_1: u8) -> () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's slightly odd, that the body item gets a full path but things inside the body are local. wfm, just a small oddity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I probably missed something. Let me check
ec1f5e3 to
e77f9fe
Compare
This comment has been minimized.
This comment has been minimized.
e77f9fe to
a4186d8
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This change fixes the behavior of the
name()function forCrateDefandInstancewhich should return absolute path of items. For local items, the crate name was missing.This resolves: rust-lang/project-stable-mir#109